import CryptoJS from 'crypto-js';

const secretKey = '123456';

// 加密
export function encrypt(val: string): string {
    return CryptoJS.AES.encrypt(val, secretKey).toString();
}

// 解密
export function decrypt(val: string): string {
    return CryptoJS.AES.decrypt(val, secretKey).toString(CryptoJS.enc.Utf8);
}
